|
![](/i/fill.gif) |
"Rarius" <rar### [at] rarius co uk> wrote:
> I just can't get my head around this problem...
>
> I am trying to render a high resolution image of Saturn's rings. I can't use
> colour maps for this as they won't have the resolution required (I believe
> colour_maps are limited in the number of elements you can have!)
>
It is true that maps are limited to 255 entries, but if you use a pigment map
with nested color_maps, the pigment_map may have 255 entries, each with a
color_map containing its own 255 entries.
> I have written a group of float functions that produce the red, green, blue,
> transparency and several various albedo values. I also have a function that
> varies between 0 and 1 across the ring plane... OK so far.
>
> My problem is that I cannot seem to combine these to produce a pigment.
>
> The following code fails with a "numeric expression expected" error...
> disc
> {
> 0, z, OuterEdge, InnerEdge
> pigment
> {
> rgbt<fRingRed(x,y,z), fRingGreen(x,y,z), fRingBlue(x,y,z),
> fRingTrans(x,y,z)>
> }
> }
>
> It appears you can't put functions into a rgbt<>.
I am assuming those are pigment functions, which do not return a single value -
they return a color 3vector. Assuming that they are returning a grayscale
value, you can change that to:
pigment
{
color rgbt <fRingRed(x,y,z).red,
fRingGreen(x,y,z).red,
fRingBlue(x,y,z).red,
fRingTrans(x,y,z).red>
}
Note that while I am extracting what would be the red component, this doesn't
have anything to do with the color produced by the pigment. I am just pulling
the first float out of the 3 vector.
HTH
-Reactor
Post a reply to this message
|
![](/i/fill.gif) |